﻿using System;
using System.Windows;
using System.Windows.Input;

namespace SilverlightWebcamEncoder
{
    public partial class MainPage
    {
        public MainPage()
        {
            InitializeComponent();

            MouseLeftButtonDown += MainPage_MouseLeftButtonDown;
        }

        private void MainPage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (Application.Current.IsRunningOutOfBrowser)
                Application.Current.MainWindow.DragMove();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (Application.Current.IsRunningOutOfBrowser)
                Application.Current.MainWindow.Close();
        }
    }
}
